import mypandas
def square(x):
    return  x * x
def cube(x):
    return x * x * x
while True:
    print("Please enter a number: ")
    num = input()
    try:
        num = int(num)
    except:
        print("Invalid input")
        continue
    print(f"{num} squared is {square(num)}")
    print(f"{num} cubed is {cube(num)}")
    if num == 'exit':
        break
